//
//(C) Copyright 2011 HongKong Airline.,Ltd. 
//
/**
 * clientreferAction
 * 项目名称:代购系统
 * @author Mengxiangliang
 * 功能描述:
 * 历史版本:2013-01-04 v1.0.0 Mengxiangliang  创建:
 * @version [V1] 
 */
package com.gamutsoft.amb.clientrefer.action;

import java.util.List;
import java.util.Map;

import com.gamutsoft.amb.base.action.BaseAction;
import com.gamutsoft.amb.clientrefer.model.Clientrefer;
import com.gamutsoft.amb.clientrefer.service.IClientreferService;
import com.gamutsoft.amb.common.bean.QueryExample;
import com.gamutsoft.amb.common.exception.BusinessException;
import com.gamutsoft.amb.common.util.ConditionUtil;
import com.gamutsoft.amb.common.util.PageUtil;


@SuppressWarnings({"serial","rawtypes"})
public class ClientreferAction extends BaseAction {
	
	private Clientrefer clientrefer;
	
	private List<Map> clientreferList;
	
	
	private IClientreferService clientreferService;

	/**
	 * 初始化查询Clientrefer信息
	 * @author Mengxiangliang
	 * @return
	 */
	public String initSearchClientrefer()throws BusinessException, Exception {
		try {
		    QueryExample qe =ConditionUtil.copyConditionBySql(this.getRequest());
			PageUtil  pageutil =new PageUtil(this.getRequest());
			pageutil.setPageSize(PageUtil.PAGESIZE);
			qe.setPageUtil(pageutil);
			clientreferList = clientreferService.searchClientreferList(qe);
		
		} catch(BusinessException be){
			log.error(be);
			throw be;
		}catch(Exception e){
			log.error(e);
			throw e;
		}
		return "init_search_clientrefer_success";
	}
	

	/**
	 * @return the clientrefer
	 */
	public Clientrefer getClientrefer() {
		return clientrefer;
	}

	/**
	 * @param clientrefer the clientrefer to set
	 */
	public void setClientrefer(Clientrefer clientrefer) {
		this.clientrefer = clientrefer;
	}

	/**
	 * @return the clientreferList
	 */
	public List<Map> getClientreferList() {
		return clientreferList;
	}

	/**
	 * @param clientreferList the clientreferList to set
	 */
	public void setClientreferList(List<Map> clientreferList) {
		this.clientreferList = clientreferList;
	}


	/**
	 * @param clientreferService the clientreferService to set
	 */
	public void setClientreferService(IClientreferService clientreferService) {
		this.clientreferService = clientreferService;
	}
}
